home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / trace / tcpdump-2.2.1 / README < prev    next >
Encoding:
Text File  |  1992-05-26  |  13.5 KB  |  332 lines

  1. Fri May 22 17:19:41 PDT 1992
  2. Version 2.2
  3.  
  4. This directory contains tcpdump version 2.2, the Berkely Packet Filter (BPF),
  5. and tcpslice, a tool for manipulating raw packet traces.  Note that there
  6. was no 2.1 release.  Version 2.1beta was released with the BSD Networking 2
  7. tape, but we never got around to a general 2.1 release.
  8.  
  9. Tcpdump runs on following platforms:
  10.  
  11.     machine        os                packet filter
  12.     -------        --                -------------
  13.     hp300        4.3BSD Tahoe/Reno        bpf
  14.     sparc        SunOS 4.x            bpf, nit
  15.     sun3        SunOS 3.5, SunOS 4.x        bpf, nit
  16.     Decstation    Ultrix 4.0 (and higher)        packetfilter
  17.     IBM RT        4.3BSD                enet
  18.     386/486        4.3BSD netII            bpf
  19.  
  20. BPF can be installed in SunOS kernels, provided you have source, 4.3BSD
  21. kernels, and is now standard in BSD systems.  (The Networking II release
  22. from CSRG has BPF support.  Tcpdump can be temporarily found in 
  23. /usr/src/contrib.)  See bpf/README for further details and an installation
  24. procedure.
  25.  
  26. In addition to bug fixes, changes from version 2.0 include:
  27.  
  28. - Easy access to icmp packets, via the 'icmp' keyword.  For example,
  29.  
  30.     % tcpdump 'icmp[0] != 8 and icmp[0] != 0'
  31.  
  32.   matches non-echo/reply ICMP packets.
  33.  
  34. - An improved filter code optimizer.
  35.  
  36. - A multicast keyword.  Also, the broadcast keyword can now be qualified 
  37.   with a protocol layer.  For instance, "ip broadcast" and "ether multicast"
  38.   are valid filters.
  39.  
  40. - Support for monitoring the loopback interface (i.e. 'tcpdump -i lo').
  41.   Jeffrey Honig (jch@MITCHELL.CIT.CORNELL.EDU) contributed the kernel
  42.   patches to netinet/if_loop.c.
  43.  
  44. - Support for the Ungermann-Bass Ethernet on IBM/PC-RTs running AOS.
  45.   Contact Jeffrey Honig for the diffs.
  46.  
  47. - Decoding of EGP and OSPF packets, thanks to Jeffrey Honig.
  48.  
  49. - The tcpslice program, thanks to Vern Paxson (vern@ee.lbl.gov).  Check
  50.   out the man page (tcpslice.1) for more information.
  51.  
  52. The BPF kernel interface has changed and is not backward compatible
  53. with the interface from the 2.0 release.  tcpdump-2.1 won't work with 
  54. old versions of BPF, but will work with the CSRG Networking II release.
  55. If you've made the bpf changes to network drivers, you'll need to update
  56. them (see bpf/README).  Also, if you've written any BPF applications,
  57. they may need some minor changes (with respect to ioctls).
  58.  
  59. The BPF man page is improved and contains an explanation of the
  60. filtering language.
  61.  
  62. Tcpdump's makefile has continued to evolve.  Multiple platforms are
  63. supported using subdirectories.  See INSTALL for more details.
  64.  
  65. Problems, bugs, questions, desirable enhancements, etc., should be
  66. sent to the email address "tcpdump@ee.lbl.gov".  
  67.  
  68.  - Steve McCanne (mccanne@ee.lbl.gov)
  69.    Craig Leres (leres@ee.lbl.gov)
  70.    Van Jacobson (van@ee.lbl.gov)
  71.  
  72. ------------------------------
  73.  
  74. Old news:
  75.  
  76.  - A packet dumper has been added (thanks to Jeff Mogul of DECWRL). 
  77.    With this option, you can create an architecture independent binary 
  78.    trace file in real time, without the overhead of the packet printer.  
  79.    At a later time, the packets can be filtered (again) and printed.
  80.  
  81.  - BSD is supported.  You must have BPF in your kernel.
  82.    Since the filtering is now done in the kernel, fewer packets are
  83.    dropped.  In fact, with BPF and the packet dumper option, a measly
  84.    Sun 3/50 can keep up with a busy network.
  85.  
  86.  - Compressed SLIP packets can now be dumped, provided you use our
  87.    SLIP software and BPF.  These packets are dumped as any other IP
  88.    packet; the compressed headers are dumped with the '-e' option.
  89.  
  90.  - Machines with little-endian byte ordering are supported (thanks to
  91.    Jeff Mogul).
  92.  
  93.  - Ultrix 4.0 is supported (also thanks to Jeff Mogul).
  94.  
  95.  - IBM RT and Stanford Enetfilter support has been added by
  96.    Rayan Zachariassen <rayan@canet.ca>.  Tcpdump has been tested under
  97.    both the vanilla enetfilter interface, and the extended interface 
  98.    (#ifdef'd by IBMRTPC) present in the MERIT version of the enetfilter.
  99.  
  100.  - TFTP packets are now printed (requests only).
  101.  
  102.  - BOOTP packets are now printed.
  103.  
  104.  - SNMP packets are now printed. (thanks to John LoVerso of Xylogics).
  105.  
  106.  - Sparc architectures, including the Sparcstation-1, are now
  107.    supported thanks to Steve McCanne and Craig Leres.
  108.  
  109.  - SunOS 4 is now supported thanks to Micky Liu of Columbia
  110.    University (micky@cunixc.cc.columbia.edu).
  111.  
  112.  - IP options are now printed.
  113.  
  114.  - RIP packets are now printed.
  115.  
  116.  - There's a -v flag that prints out more information than the
  117.    default (e.g., it will enable printing of IP ttl, tos and id)
  118.    and -q flag that prints out less (e.g., it will disable
  119.    interpretation of AppleTalk-in-UDP).
  120.  
  121.  - The grammar has undergone substantial changes (if you have an
  122.    earlier version of tcpdump, you should re-read the manual
  123.    entry).
  124.  
  125.    The most useful change is the addition of an expression
  126.    syntax that lets you filter on arbitrary fields or values in the
  127.    packet.  E.g., "ip[0] > 0x45" would print only packets with IP
  128.    options, "tcp[13] & 3 != 0" would print only TCP SYN and FIN
  129.    packets.
  130.  
  131.    The most painful change is that concatenation no longer means
  132.    "and" -- e.g., you have to say "host foo and port bar" instead
  133.    of "host foo port bar".  The up side to this down is that
  134.    repeated qualifiers can be omitted, making most filter
  135.    expressions shorter.  E.g., you can now say "ip host foo and
  136.    (bar or baz)" to look at ip traffic between hosts foo and bar or
  137.    between hosts foo and baz.  [The old way of saying this was "ip
  138.    host foo and (ip host bar or ip host baz)".]
  139.  
  140. ------------------------------
  141.  
  142. The program is loosely based on SMI's "etherfind" although none
  143. of the etherfind code remains.  It was originally written by Van
  144. Jacobson, Lawrence Berkeley Laboratory, as part of an ongoing
  145. research project to investigate and improve tcp and internet
  146. gateway performance.  The parts of the program originally taken
  147. from Sun's etherfind were later re-written by Steve McCanne of
  148. LBL.  To insure that would be no vestige of proprietary code in
  149. tcpdump, Steve wrote these pieces from the specification given
  150. by the manual entry, with no access to the source of tcpdump or
  151. etherfind.
  152.  
  153. The current versions of these files are available via anonymous
  154. ftp from host ftp.ee.lbl.gov (currently at address 128.3.254.68)
  155. file tcpdump.tar.Z (a compressed Unix tar file).
  156.  
  157. This program is subject to the 'standard' Berkeley network software
  158. copyright:
  159.   
  160.   Copyright (c) 1988-1990 The Regents of the University of California.
  161.   All rights reserved.
  162.  
  163.   Redistribution and use in source and binary forms, with or without
  164.   modification, are permitted provided that: (1) source code distributions
  165.   retain the above copyright notice and this paragraph in its entirety, (2)
  166.   distributions including binary code include the above copyright notice and
  167.   this paragraph in its entirety in the documentation or other materials
  168.   provided with the distribution, and (3) all advertising materials mentioning
  169.   features or use of this software display the following acknowledgement:
  170.   ``This product includes software developed by the University of California,
  171.   Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  172.   the University nor the names of its contributors may be used to endorse
  173.   or promote products derived from this software without specific prior
  174.   written permission.
  175.   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  176.   WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  177.   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  178.  
  179. Enjoy.
  180.  
  181.   - Van Jacobson, Steve McCanne, Craig Leres
  182. ----------------------------
  183.  
  184. This directory also contains some short awk programs intended as
  185. examples of ways to reduce tcpdump data when you're tracking
  186. particular network problems:
  187.  
  188. send-ack.awk
  189.     Simplifies the tcpdump trace for an ftp (or other unidirectional
  190.     tcp transfer).  Since we assume that one host only sends and
  191.     the other only acks, all address information is left off and
  192.     we just note if the packet is a "send" or an "ack".
  193.  
  194.     There is one output line per line of the original trace. 
  195.     Field 1 is the packet time in decimal seconds, relative
  196.     to the start of the conversation.  Field 2 is delta-time
  197.     from last packet.  Field 3 is packet type/direction. 
  198.     "Send" means data going from sender to receiver, "ack"
  199.     means an ack going from the receiver to the sender.  A
  200.     preceding "*" indicates that the data is a retransmission.
  201.     A preceding "-" indicates a hole in the sequence space
  202.     (i.e., missing packet(s)), a "#" means an odd-size (not max
  203.     seg size) packet.  Field 4 has the packet flags
  204.     (same format as raw trace).  Field 5 is the sequence
  205.     number (start seq. num for sender, next expected seq number
  206.     for acks).  The number in parens following an ack is
  207.     the delta-time from the first send of the packet to the
  208.     ack.  A number in parens following a send is the
  209.     delta-time from the first send of the packet to the
  210.     current send (on duplicate packets only).  Duplicate
  211.     sends or acks have a number in square brackets showing
  212.     the number of duplicates so far. 
  213.  
  214.     Here is a short sample from near the start of an ftp:
  215.         3.00    0.20   send . 512
  216.         3.20    0.20    ack . 1024  (0.20)
  217.         3.20    0.00   send P 1024
  218.         3.40    0.20    ack . 1536  (0.20)
  219.         3.80    0.40 * send . 0  (3.80) [2]
  220.         3.82    0.02 *  ack . 1536  (0.62) [2]
  221.     Three seconds into the conversation, bytes 512 through 1023
  222.     were sent.  200ms later they were acked.  Shortly thereafter
  223.     bytes 1024-1535 were sent and again acked after 200ms. 
  224.     Then, for no apparent reason, 0-511 is retransmitted, 3.8
  225.     seconds after its initial send (the round trip time for this
  226.     ftp was 1sec, +-500ms).  Since the receiver is expecting
  227.     1536, 1536 is re-acked when 0 arrives. 
  228.  
  229. packetdat.awk
  230.     Computes chunk summary data for an ftp (or similar
  231.     unidirectional tcp transfer). [A "chunk" refers to
  232.     a chunk of the sequence space -- essentially the packet
  233.     sequence number divided by the max segment size.]
  234.  
  235.     A summary line is printed showing the number of chunks,
  236.     the number of packets it took to send that many chunks
  237.     (if there are no lost or duplicated packets, the number
  238.     of packets should equal the number of chunks) and the
  239.     number of acks.
  240.  
  241.     Following the summary line is one line of information
  242.     per chunk.  The line contains eight fields:
  243.        1 - the chunk number
  244.        2 - the start sequence number for this chunk
  245.        3 - time of first send
  246.        4 - time of last send
  247.        5 - time of first ack
  248.        6 - time of last ack
  249.        7 - number of times chunk was sent 
  250.        8 - number of times chunk was acked
  251.     (all times are in decimal seconds, relative to the start
  252.     of the conversation.)
  253.  
  254.     As an example, here is the first part of the output for
  255.     an ftp trace:
  256.  
  257.     # 134 chunks.  536 packets sent.  508 acks.
  258.     1       1       0.00    5.80    0.20    0.20    4       1
  259.     2       513     0.28    6.20    0.40    0.40    4       1
  260.     3       1025    1.16    6.32    1.20    1.20    4       1
  261.     4       1561    1.86    15.00   2.00    2.00    6       1
  262.     5       2049    2.16    15.44   2.20    2.20    5       1
  263.     6       2585    2.64    16.44   2.80    2.80    5       1
  264.     7       3073    3.00    16.66   3.20    3.20    4       1
  265.     8       3609    3.20    17.24   3.40    5.82    4       11
  266.     9       4097    6.02    6.58    6.20    6.80    2       5
  267.  
  268.     This says that 134 chunks were transfered (about 70K
  269.     since the average packet size was 512 bytes).  It took
  270.     536 packets to transfer the data (i.e., on the average
  271.     each chunk was transmitted four times).  Looking at,
  272.     say, chunk 4, we see it represents the 512 bytes of
  273.     sequence space from 1561 to 2048.  It was first sent
  274.     1.86 seconds into the conversation.  It was last
  275.     sent 15 seconds into the conversation and was sent
  276.     a total of 6 times (i.e., it was retransmitted every
  277.     2 seconds on the average).  It was acked once, 140ms
  278.     after it first arrived.
  279.  
  280. stime.awk
  281. atime.awk
  282.     Output one line per send or ack, respectively, in the form
  283.         <time> <seq. number>
  284.     where <time> is the time in seconds since the start of the
  285.     transfer and <seq. number> is the sequence number being sent
  286.     or acked.  I typically plot this data looking for suspicious
  287.     patterns.
  288.  
  289.  
  290. The problem I was looking at was the bulk-data-transfer
  291. throughput of medium delay network paths (1-6 sec.  round trip
  292. time) under typical DARPA Internet conditions.  The trace of the
  293. ftp transfer of a large file was used as the raw data source. 
  294. The method was:
  295.  
  296.   - On a local host (but not the Sun running tcpdump), connect to
  297.     the remote ftp.
  298.  
  299.   - On the monitor Sun, start the trace going.  E.g.,
  300.       tcpdump host local-host and remote-host and port ftp-data >tracefile
  301.  
  302.   - On local, do either a get or put of a large file (~500KB),
  303.     preferably to the null device (to minimize effects like
  304.     closing the receive window while waiting for a disk write).
  305.  
  306.   - When tranfer is finished, stop tcpdump.  Use awk to make up
  307.     two files of summary data (maxsize is the maximum packet size,
  308.     tracedata is the file of tcpdump tracedata):
  309.       awk -f send-ack.awk packetsize=avgsize tracedata >sa
  310.       awk -f packetdat.awk packetsize=avgsize tracedata >pd
  311.  
  312.   - While the summary data files are printing, take a look at
  313.     how the transfer behaved:
  314.       awk -f stime.awk tracedata | xgraph
  315.     (90% of what you learn seems to happen in this step).
  316.  
  317.   - Do all of the above steps several times, both directions,
  318.     at different times of day, with different protocol
  319.     implementations on the other end.
  320.  
  321.   - Using one of the Unix data analysis packages (in my case,
  322.     S and Gary Perlman's Unix|Stat), spend a few months staring
  323.     at the data.
  324.  
  325.   - Change something in the local protocol implementation and
  326.     redo the steps above.
  327.  
  328.   - Once a week, tell your funding agent that you're discovering
  329.     wonderful things and you'll write up that research report
  330.     "real soon now".
  331.  
  332.